package com.didispace.service;

import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * 
 * @author Eshin
 *
 * 如果配置项hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds
 * 的值比compute-service.ribbon.ConnectTimeout(compute-service.ribbon.ReadTimeout)的值大，当请求超时时
 * ribbon会重新选一个注册的服务进行访问，如果重新选的服务能够正常访问并不会调用本实现类，直到超过
 * hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds的时间才会调用本类
 *
 */
@Component
public class ComputeClientHystrix implements ComputeClient {
    @Override
    public Integer add(@RequestParam(value = "a") Integer a, @RequestParam(value = "b") Integer b) {
        return -9999;
    }
    
}
